<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.ajax4jsf.org/rich"
                template="layout/template.xhtml">
                       
<ui:define name="body">
    
    <h:messages globalOnly="true" styleClass="message"/>
    
    <rich:panel>
        <f:facet name="header">userRoleList</f:facet>
        
        <div class="results">
        
            <h:outputText value="No userRole exists" 
                       rendered="#{empty userRoleList.resultList}"/>
                   
            <h:dataTable id="userRoleList" var="userRole"
                      value="#{userRoleList.resultList}" 
                   rendered="#{not empty userRoleList.resultList}">
                <h:column>
                    <f:facet name="header">Id</f:facet>
                    #{userRole.id}
                </h:column>
                <h:column>
                    <f:facet name="header">Name</f:facet>
                    <s:link id="userRole" 
                         value="#{userRole.name}" 
                         view="/userRole.xhtml">
                        <f:param name="userRoleId" 
                                value="#{userRole.id}"/>
                    </s:link>
                </h:column>
            </h:dataTable>
        
        </div>
        
    </rich:panel>
    
    <div class="actionButtons">
        <s:button id="done" 
               value="Create userRole"
                view="/userRole.xhtml"/>			  
    </div>
    
</ui:define>

</ui:composition>

